package com.wwj.auction.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wwj.auction.common.entity.to.CreateOrderTo;
import com.wwj.auction.order.entity.ShopOrder;
import com.wwj.auction.order.entity.vo.OrderVo;
import com.wwj.auction.order.entity.vo.SimpleOrderVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wwj
 * @since 2021-08-30
 */
public interface OrderService extends IService<ShopOrder> {

    /**
     * 生成订单
     *
     * @param createOrderTo
     * @return
     */
    int create(CreateOrderTo createOrderTo);

    /**
     * 查询订单信息
     *
     * @param shopId
     * @return
     */
    OrderVo get(Integer shopId);

    /**
     * 通过订单号查询买家和商品id
     *
     * @param orderNo
     * @return
     */
    List<Integer> getIdByOrderNo(String orderNo);

    Map<String, String> getVolumeAndAmount();

    List<BigDecimal> getAmount();

    List<SimpleOrderVo> getOrderList();

    ShopOrder getOrder(String orderNo);
}
